{ ***  cef_download_item_capi.h  *** }

  PCefDownloadItem = ^TCefDownloadItem;

  // Structure used to represent a download item.
  TCefDownloadItem = record
    // Base structure.
    base: TCefBase;

    // Returns true (1) if this object is valid. Do not call any other functions
    // if this function returns false (0).
    is_valid: function(self: PCefDownloadItem): Integer; cconv;

    // Returns true (1) if the download is in progress.
    is_in_progress: function(self: PCefDownloadItem): Integer; cconv;

    // Returns true (1) if the download is complete.
    is_complete: function(self: PCefDownloadItem): Integer; cconv;

    // Returns true (1) if the download has been canceled or interrupted.
    is_canceled: function(self: PCefDownloadItem): Integer; cconv;

    // Returns a simple speed estimate in bytes/s.
    get_current_speed: function(self: PCefDownloadItem): Int64; cconv;

    // Returns the rough percent complete or -1 if the receive total size is
    // unknown.
    get_percent_complete: function(self: PCefDownloadItem): Integer; cconv;

    // Returns the total number of bytes.
    get_total_bytes: function(self: PCefDownloadItem): Int64; cconv;

    // Returns the number of received bytes.
    get_received_bytes: function(self: PCefDownloadItem): Int64; cconv;

    // Returns the time that the download started.
    get_start_time: function(self: PCefDownloadItem): TCefTime; cconv;

    // Returns the time that the download ended.
    get_end_time: function(self: PCefDownloadItem): TCefTime; cconv;

    // Returns the full path to the downloaded or downloading file.
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_full_path: function(self: PCefDownloadItem): PCefStringUserFree; cconv;

    // Returns the unique identifier for this download.
    get_id: function(self: PCefDownloadItem): UInt32; cconv;

    // Returns the URL.
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_url: function(self: PCefDownloadItem): PCefStringUserFree; cconv;

    // Returns the suggested file name.
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_suggested_file_name: function(self: PCefDownloadItem): PCefStringUserFree; cconv;

    // Returns the content disposition.
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_content_disposition: function(self: PCefDownloadItem): PCefStringUserFree; cconv;

    // Returns the mime type.
    //
    // The resulting string must be freed by calling cef_string_userfree_free().
    get_mime_type: function(self: PCefDownloadItem): PCefStringUserFree; cconv;
  end;


